home *** CD-ROM | disk | FTP | other *** search
Wrap
XSetup plugin | 2004-03-02 | 4.1 KB | 136 lines
"FILE"="Xteq Systems X-Setup Plugin 6.0" "TYPE"="8" "COUNT"="3" "UIPATH 1"="System\Software Installation\Company/Owner Information" "UIPATH 2"="Virtual Paranoia\User Data" "NAME"="Software Company/Owner Information" "LANGUAGE"="VBScript" "OSVERSION"="00010111" "VERSION"="1.01" "TEXT 1"="Show Info" "TEXT 2"="Edit Company" "TEXT 3"="Edit Ower/User" "DESCRIPTION 1"="Each program that is installed by the Windows Installer (MSI) can have a registered company and a registered owner associated with it." "DESCRIPTION 2"="Some programs use this registered company and owner by displaying it inside the "About" box of the program. An example of this procedure is Office XP and upwards." "DESCRIPTION 3"="This list shows you all installed programs on your computer that have been installed by MSI. Beside the name of it, it displays you the registered company and owner. Use the buttons to change the company, the owner or both to whatever you wish. " "DESCRIPTION 4"="If some products do not have a company or owner, this is not a failure. Some programs simply do not make any use of this information." "AUTHOR"="Xteq Systems" "CONTACTURL"="http://www.xteq.com" "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved" "COMMENT 1"="NT AUTHORITY\SYSTEM S-1-5-18" "COMMENT 2"=" " sP="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\" sDisp="\InstallProperties\DisplayName" sCompany="\InstallProperties\RegCompany" sUser="\InstallProperties\RegOwner" sTMP_DisplayName="" sTMP_Company="" sTMP_User="" Dim aryLoc() 'Called when the Plugin is started SUB Plugin_Initialize iCount=RegEnumPaths(sP) 'count how many real items we have if iCount>0 then 'redim array ReDim aryLoc(iCount) for l=1 to iCount aryLoc(l)=RegEnumElement(l) Call GetAllInfos(aryLoc(l)) if len(sTMP_DisplayName)>0 then sInfo="" if len(sTMP_Company)=0 and len(sTMP_User)=0 then sInfo="NONE" else sInfo=sTMP_Company & "/" & sTMP_User end if sInfo="(" & sInfo & ")" Call SetUIElement(l,sTMP_DisplayName & " " & sInfo) end if next else Disable end if END SUB Sub GetAllInfos(ItemGUID) 'reset values sTMP_DisplayName="" sTMP_Company="" sTMP_User="" sTMPRegPath=sP & ItemGUID & sDisp sTMP_DisplayName=RegReadValue(sTMPRegPath) sTMPRegPath=sP & ItemGUID & sCompany sTMP_Company=RegReadValue(sTMPRegPath) sTMPRegPath=sP & ItemGUID & sUser sTMP_User=RegReadValue(sTMPRegPath) end Sub 'Called when the Plugin should validate the Data the user has entered SUB Plugin_CheckData(ElementIndex) END SUB 'Called when the Plugin should apply the changes SUB Plugin_Apply(ElementIndex,ElementSubIndex) if ElementSubIndex>0 then 'OK, user has selected an item sItem=aryLoc(ElementSubIndex) Call GetAllInfos(sItem) If ElementIndex=1 then 'show info sInfo1="Product: " & sTMP_DisplayName & chr(13) & chr(10) sInfo2="Registered Company: " & sTMP_Company & chr(13) & chr(10) sInfo3="Registered User: " & sTMP_User & chr(13) & chr(10) Call MsgInformation(sInfo1 & sInfo2 & sInfo3) end if If ElementIndex=2 then 'edit company sRegPath=sP & sItem & sCompany sV=sTMP_Company sV=InputWindow("Please type the company for the selected product",sV,1) if IsEmpty(sV)=false then 'change it! Call RegWriteValue(sRegPath,sV,1) Call Plugin_Initialize end if end if If ElementIndex=3 then 'edit user sRegPath=sP & sItem & sUser sV=sTMP_User sV=InputWindow("Please type the owner for the selected product",sV,1) if IsEmpty(sV)=false then 'change it! Call RegWriteValue(sRegPath,sV,1) Call Plugin_Initialize end if end if else Call MsgWarning("No item selected - please select an item first.") end if END SUB 'Called when the Plugin is about to be removed from memory SUB Plugin_Terminate END SUB